home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 15726 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: lrz-muenchen.de!news
  2. From: watzka@stat.uni-muenchen.de (Kurt Watzka)
  3. Newsgroups: alt.msdos.programmer,comp.lang.c,comp.lang.pascal.misc
  4. Subject: Re: typecasting preferences
  5. Date: 21 Apr 1996 12:30:23 GMT
  6. Organization: Leibniz-Rechenzentrum, Muenchen (Germany)
  7. Distribution: world
  8. Message-ID: <4ld9ov$rek@sparcserver.lrz-muenchen.de>
  9. References: <4l020g$i9j@srvr1.engin.umich.edu> <Pine.A32.3.91.960416145209.106109C-100000@black.weeg.uiowa.edu> <4l4ldb$nkl@srvr1.engin.umich.edu> <3177866E.167E@wight.hursley.ibm.com>
  10. NNTP-Posting-Host: sun2.lrz-muenchen.de
  11.  
  12. Max Waterman <dwater@wight.hursley.ibm.com> writes:
  13.  
  14. >union Int_Over_Float {
  15. >      Int integer;
  16. >      Float floating_point;
  17. >    };
  18. >    typedef union Int_Over_Float Int_Over_Float;
  19.  
  20. C _is_ case sensitive. There may be some local typedef standards that
  21. require you to have something like
  22.  
  23.   typedef int Int;
  24.   typedef float Float;
  25.  
  26. but I have never fully understood how this could help porting a program.
  27. If your code assumes that int is a 32-bit number, it's portability is
  28. restricted to 32-bit architectures, anyway. If you need a 32-bit type,
  29. why don't you ("You" is not Max Waterman in this case, but a less 
  30. personal you) give it a name that documents that you assume that it
  31. will be a 32-bit type.
  32.  
  33. Kurt
  34. --
  35. | Kurt Watzka                             Phone : +49-89-2180-6254
  36. | watzka@stat.uni-muenchen.de
  37.  
  38.